package com.lxw.api.cms;

import com.lxw.framework.domain.cms.CmsTemplate;
import com.lxw.framework.model.response.QueryResponseResult;
import com.lxw.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.bson.types.ObjectId;

import java.io.FileNotFoundException;


@Api(value = "cms模板信息", description = "cms模板信息的基本操作")
public interface CmsTemplateControllerApi {

    @ApiOperation(value = "查询所有的模板")
    QueryResponseResult findTemplateAll();

    @ApiOperation(value = "模板查询：站点ID：精确匹配，模板名称：模糊匹配")
    //模板查询 站点ID：精确匹配，模板名称：模糊匹配
    QueryResponseResult findTemplate(String siteId, String tempName);


    @ApiOperation(value = "模板添加 模板名称、站点ID、模版文件Id：templateFileId不能为空")
    //模板添加 模板名称、站点ID、模版文件Id：templateFileId不能为空
    public ResponseResult addTemplate(CmsTemplate cmsTemplate);

    @ApiOperation(value = "储存模板到GridFs")
    public ObjectId storeTemplate(String url, String fileName) throws FileNotFoundException;
}
